<!-- Main content -->
<div class="wrapper">
	<div class="fluid">
		<div class="widget grid12" style="margin:0">
			<div class="whead">
				<h6>编辑管理员权限</h6>
				<div class="clear"></div>
			</div>
			
			<form id="admin_form" action="<?php echo BASE_URL;?>admin/editrole/admin_id/<?php echo $admin['admin_id'];?>" method="post">
			<div class="formRow">
				<div class="grid3">
					<label>用户名 :</label> 
					<?php echo CHtml::encode($admin['admin_name']);?>
				</div>
				
				<div class="clear"></div>
			</div>
			<div class="formRow">
				<div class="grid3">
					<label>选择权限组 :</label>
					<select name="role_id" class="select">
						<?php foreach ($role_list as $role):?>
						<option value="<?php echo $role['role_id'];?>" <?php if ($role['role_id'] == $admin['role_id']):?>selected="selected"<?php endif;?>><?php echo $role['role_name'];?></option>
						<?php endforeach;?>
					</select>
				</div>
				<div class="clear"></div>
			</div>
			
			<div class="formRow">
				<input type="submit" value="保存" class="buttonL bBlue formSubmit" />
				<div class="clear"></div>
			</div>
			</form>
		</div>
	</div>
</div>

<?php $this->util->js(array(
	'js/plugins/forms/jquery.validationEngine-zh_CN.js',
	'js/plugins/forms/jquery.validationEngine.js'
));?>
<script type="text/javascript">
$(document).ready(function() {
	$("#admin_form").validationEngine({
		ajaxFormValidation: true,
		ajaxFormValidationMethod: 'post',
		onBeforeAjaxFormValidation: function() {
			
		},
		onAjaxFormComplete: function(status, obj, result) {
			show_msg(result);
		}
	});
});
</script>